package com.dmw.service;

import com.dmw.dto.Dto;
import com.dmw.service.impl.ConsumerOrderServiceImpl;
import com.dmw.vo.orderVO.OrderInfoInVo;
import com.dmw.vo.placeOrderVO.AddOrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient(name = "p-order",fallback= ConsumerOrderServiceImpl.class)
public interface ConsumerOrderService {

    /**
     * 根据订单状态、订单创建时间、关键词(商品名称，订单号，商品编号模糊)
     * from 订单管理页面API 1
     * @param map
     * @return
     */
    @PostMapping("/queryOrderList")
    public Dto queryOrderList(@RequestBody Map<String, Object> map);

    /**
     * 下单接口
     * from 下单页API 5
     * @param addOrderVO
     * @return
     */
    @PostMapping("/createOrder")
    public Dto createOrder(@RequestBody AddOrderVO addOrderVO);

    /**
     * 根据订单号查询订单
     * from 下单页 确认支付页API 1
     * @param map
     * @return
     */
    @PostMapping("/queryOrderByOrderNo")
    public Dto queryOrderByOrderNo(@RequestBody Map<String,Object> map);

    /**
     *监听订单支付状态接口
     * @param map
     * @return
     */
    @PostMapping("/queryOrderState")
    public Dto queryOrderState(@RequestBody Map<String,Object> map);


}
